/*
 * @LastEditors: 七七
 * @Date: 2023-01-08 11:44:42
 * 
 * 该文件专门用于暴露一个store对象，整个应用只有一个store对象
 */

import { createStore, applyMiddleware, combineReducers } from 'redux'
import countReducer from './reducers/count.js' //默认暴露
import personReducer from './reducers/person.js'
import thunk from 'redux-thunk'

// 汇总所有的reducer变为一个总的reducer
const allRuducer = combineReducers({
  he: countReducer,
  rens: personReducer,
})

//暴露代码
export default createStore(allRuducer, applyMiddleware(thunk));